<{includeq file='db:index_header.html'}>
<div class="article_content">
	<!-- article title -->
	<{if $article.image}>
		<div class="article_image">
			<a class="article_screen" href="<{$article.image}>" title="<{$article.title}>" rel="lightbox">
				<img src="<{$article.thumb}>" alt="<{$article.title}>" />
			</a>
		</div>
	<{/if}>
	<div class="article_title">
		<h1><{$article.title}>
		<{if $article.article_is_updated}>
			<img class="article_icon_middle" src="<{$article.article_is_updated}>" title="<{$smarty.const._MD_ARTICLE_UPDATED}>" />
		<{elseif $article.article_is_new}>
			<img class="article_icon_middle" src="<{$article.article_is_new}>" title="<{$smarty.const._MD_ARTICLE_NEW}>" />
		<{/if}>
		
		<{if $article.article_popular}>
			<img class="article_icon_middle" src="<{$article.article_popular}>" title="<{$smarty.const._MD_ARTICLE_POPULAR}>" />
		<{/if}></h1>
	</div>
	<div class="article_info">
		<p><{$smarty.const._MD_ARTICLE_PUBLISHER}>&nbsp;:&nbsp;
			<{foreach item=user from=$article.avatar name=user}>
				<span><{$user.publisher}></span><{if !$smarty.foreach.user.last}>, <{/if}>
			<{/foreach}>
		</p>
		<p><{$smarty.const._MD_ARTICLE_PUBLISHED_ON}>&nbsp;:&nbsp;<{$article.published_on}></p>
	</div>
	<!-- article categories -->
	<div class="article_categories">
		<{$smarty.const._MD_ARTICLE_CATS}>&nbsp;:&nbsp;<{$article.cats}>
	</div>
	
	<div class="article_clear_right">&nbsp;</div>

	<!-- article main content -->
	<div>
		<div id="article_body">
			<{$article_body}>
			<{if $article_bodynav }> <!-- pagination control -->
				<{$article_bodynav}>
			<{/if}>
		</div>
	</div>
	<div class="article_read_more">
		<h2><{$smarty.const._MD_ARTICLE_VIEW_MORE}></h2>
		<!-- article additional informations -->
		<p><{$smarty.const._MD_ARTICLE_SUBMITTER}>&nbsp;:&nbsp;<{$article.submitter}></p>
		<{if $article.updated_on}>
			<p><{$smarty.const._MD_ARTICLE_UPDATED_ON}>&nbsp;:&nbsp;<{$article.updated_on}></p>
		<{/if}>
		<{if $article.updater}>
			<p><{$smarty.const._MD_ARTICLE_UPDATER}>&nbsp;:&nbsp;<{$article.updater}></p>
		<{/if}>
		<h3><{$smarty.const._MD_ARTICLE_MORE_BY_PUBLISHER}></h3>	
		<{foreach item=user from=$article.bypublisher}>
			<div class="article_publisher">
				<span class="article_avatar">
					<img src="<{$user.avatar}>" class="article_icon_middle" alt="avatar" width="20px" height="20px" />
				</span>
				<span class="article_pub"><{$user.publisher}></span>
			</div>
		<{/foreach}>
		<div class="article_clear_left">&nbsp;</div>
		<!-- article tags -->
		<{if $article.tags}>
			<h3><{$smarty.const._MD_ARTICLE_TAGS}></h3>
			<div id="article_tags">
				<{foreach item=tag from=$article.tags name=tags}>
					<span class="article_tag" original-title="<{$tag.name}>">
						<{if $tag.icon}>
							<img width=16px height=16px src="<{$tag.icon}>" title="<{$tag.name}>" alt="<{$tag.name}>" />
						<{/if}>
						<{$tag.seoLink}><{if !$smarty.foreach.tags.last}> &nbsp;|&nbsp;<{/if}>
					</span>
					<{if $tag.dsc}>
						<span class="popup_tag"><{$smarty.const._MD_ARTICLE_ARTICLES_BY_TAGS}>&nbsp;<{$tag.title}><br /><{$tag.dsc}></span>
					<{else}>
						<span class="popup_tag"><{$smarty.const._MD_ARTICLE_ARTICLES_BY_TAGS}>&nbsp;<{$tag.name}></span>
					<{/if}>
				<{/foreach}>
				<span class="article_tagf">
					&nbsp;|&nbsp;
					<button class="trigger">
						<img class="icon_middle" src="<{$index_images_url}>tag_add.png" alt="<{$smarty.const._MD_ARTICLE_TAG_ADD}>" />
					</button>
					<{if $tag_form == TRUE}>
						<span id="tag_form">
							<form id="tag_submit" action="<{$tag_link}>" method="post">
								<input type="text" size="20" name="tag_names" maxlength="255" />
								<input type="submit" class="formButton" value="<{$smarty.const._SUBMIT}>" />
								<span id="tag_info"><{$smarty.const._MD_ARTICLE_SUBMIT_MULTI}></span>
							</form>
						</span>
						
					<{/if}>
				</span>
			</div>
		<{/if}>
			
		<{if $article.related}>
			<h3><{$smarty.const._MD_ARTICLE_RELATED}></h3>
			<div class="article_related">
				<ul>
					<{$article.related}>
				</ul>
			</div>
		<{/if}>
	</div>
	
	<{if $article.file}>
		<div class="article_attachment">
			<h2><{$smarty.const._MD_ARTICLE_FILE}></h2>
			<p><a href="<{$article.file.url}>" class="<{if $show_down_disclaimer}>down_disclaimer<{/if}>  btn download" title="<{$article.file.filename}>"><{$article.file.filename}></a> &nbsp;(&nbsp;<{$article.file.filesize}>&nbsp;|&nbsp;<{$article.file.filetype}>&nbsp;)</p>
			<{if $show_down_disclaimer}>
				<div id="dialog-confirm-disclaimer" title="Download Disclaimer" class="ui-helper-hidden">
					<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><{$down_disclaimer}></p>
				</div>
			<{/if}>
		</div>
	<{/if}>
	
	<{if $article.demo}>
		<div class="article_demo">
			<h2><{$smarty.const._MD_ARTICLE_DEMO_LINK}></h2>
			<a class="article_demo_link" href="<{$article.demo}>" title="<{$smarty.const._MD_ARTICLE_DEMO_LINK}>"><{$smarty.const._MD_ARTICLE_DEMO_LINK}></a>
		</div>
	<{/if}>
	<{if $article.conclusion}>
		<div class="article_conclusion">
			<h2><{$smarty.const._MD_ARTICLE_CONCLUSION}></h2>
			<{$article.conclusion}>
		</div>
	<{/if}>
	
	<!-- avatar -->
	<{foreach item=user from=$article.avatar}>
		<div class="article_publisher">
			<span class="article_avatar">
				<img src="<{$user.avatar}>" class="article_icon_middle" alt="avatar" width="20px" height="20px" />
			</span>
			<span class="article_pub"><{$user.publisher}></span>
		</div>
	<{/foreach}>
	<div class="article_clear_left">&nbsp;</div>
	
	<!-- article footer -->
	<div class="article_footer">
		
		<{if $article.file}>
			<div id="dialog-confirm-broken" title="<{$smarty.const._MD_ARTICLE_REPORT_BROKEN}>" class="ui-helper-hidden" >
				<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><{$smarty.const._MD_ARTICLE_SURE_BROKEN}></p>
			</div>
		
			<span class="article_broken">
				<a href="<{$broken_link}>" class="broken_link" ><{$smarty.const._MD_ARTICLE_REPORT_BROKEN}></a>
			</span>
			&nbsp;|&nbsp;
		<{/if}>
		<span class="article_tagf">
			<a href="<{$tag_link}>" class="<{if $tag_perm_denied == TRUE}>perm_tag_link<{else}>tag_link<{/if}>" >
				<{$smarty.const._MD_ARTICLE_TAG_ADD}>
			</a>
		</span>
		&nbsp;
		<span class="article_button_bar">
			<a href="mailto:?subject=<{$smarty.const._MD_ARTICLE_MAILTO_SBJ}>&body=<{$smarty.const._MD_ARTICLE_MAILTO_BDY}>" title="<{$smarty.const._MD_ARTICLE_MAILTO}>">
				<img class="article_icon_middle" src="<{$index_images_url}>mail.png" alt="<{$smarty.const._MD_ARTICLE_MAILTO}>" title="<{$smarty.const._MD_ARTICLE_MAILTO}>" />
			</a>
			<a href="<{$article_url}>print.php?article_id=<{$article.id}>" title="<{$smarty.const._MD_ARTICLE_PRINT}>" target="_blank">
				<img class="article_icon_middle" src="<{$index_images_url}>print.png" alt="<{$smarty.const._MD_ARTICLE_PRINT}>" title="<{$smarty.const._MD_ARTICLE_PRINT}>" />
			</a>
			<a href="<{$article_url}>pdf.php?article_id=<{$article.id}>" title="<{$smarty.const._MD_ARTICLE_PDF}>" target="_blank">
				<img class="article_icon_middle" src="<{$index_images_url}>pdf.png" alt="<{$smarty.const._MD_ARTICLE_PDF}>" title="<{$smarty.const._MD_ARTICLE_PDF}>" />
			</a>
			<{if $article.userCanEditAndDelete}>
				<{$article.editItemLink}>
				<{$article.deleteItemLink}>
			<{/if}>
			
		</span>
		
		<{if $tag_form}>
			<div class="ui-helper-hidden tag_form">
				<{if $article_tag_form}>
					<{includeq file='db:system_common_form.html' form=$article_tag_form}>
				<{/if}>
			</div>
		<{/if}>
		
		<div id="dialog-confirm-perm-tag" title="<{$smarty.const._MD_ARTICLE_TAG_PERM}>" class="ui-helper-hidden" >
			<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><{$smarty.const._MD_ARTICLE_TAGS_PERM}></p>
		</div>
	</div>
	<div class="article_clear_right">&nbsp;</div>
	<div class="social">
			<{if $article_googleplus}>
				<{$article_googleplus}>
			<{/if}>
			<{if $article_facebook}>
				<{$article_facebook}>
			<{/if}>
			<{if $article_twitter}>
				<{$article_twitter}>
			<{/if}>
		</div>
</div>
<script type="text/javascript"> 
	$(document).ready(function(){ 
		$('#tag_form').hide(); 
		$('.trigger').click(function() { 
			$('#tag_form').slideToggle("slow"); 
		});
	});
</script>
<{includeq file='db:article_footer.html'}>